﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Kokomo.PeInspector.Reflection
{
	/// <summary>
	/// Represents a namespace scope within an assembly.
	/// </summary>
	public class NamespaceScope
	{
		internal NamespaceScope(
			Assembly assembly,
			string @namespace,
			IEnumerable<Type> types
			)
		{
			if (assembly == null) throw new ArgumentNullException("assembly");
			//if (@namespace == null) throw new ArgumentNullException("namespace");

			this.Assembly = assembly;
			this.Namespace = @namespace;
			this._types = types;
		}

		/// <summary>
		/// The <see cref="Assembly"/> containing the namespace.
		/// </summary>
		public Assembly Assembly { get; private set; }
		/// <summary>
		/// The name of the namespace.
		/// </summary>
		public string Namespace { get; private set; }

		private IEnumerable<Type> _types;
		/// <summary>
		/// Gets a list of types within the namespace.
		/// </summary>
		public IEnumerable<Type> Types { get { return this._types; } }
	}
}
